package com.five.sso.dto;



import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class RegisterDto {

    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[A-Za-z0-9]{5,20}$",message = "用户名不合法")
    private String username;


    @Pattern(regexp = "^[A-Za-z0-9]{6,20}$",message = "密码不合法")
    private String password;

    @Pattern(regexp = "^[A-Za-z0-9]{6,20}$",message = "确认密码不合法")
    private String password2;

    @NotEmpty(message = "验证码不能为空")
    private String code;

    @Email(message = "邮箱格式不合法")
    private String email;

    @Pattern(regexp = "^((13[0-9])|(14[0,1,4-9])|(15[0-3,5-9])|(16[2,5,6,7])|(17[0-8])|(18[0-9])|(19[0-3,5-9]))\\d{8}$",message = "手机格式不合法")
    private String phone;



}